SELECT
    RANK() OVER (ORDER BY c1 DESC) as w_rnk,
    SUM(AVG(c2)) OVER (PARTITION BY c8 ORDER BY 1 ASC NULLS LAST RANGE BETWEEN CURRENT ROW AND CURRENT ROW) as sum_avg_c2
FROM "t_alltype.parquet"
GROUP BY c1,c8
    WINDOW w AS (PARTITION BY c8 ORDER BY c1 DESC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
